//中上 折线图
$.get('http://127.0.0.1:5000/task4').done(function (data) {
    var myeCharts = echarts.init(document.querySelector('.panel .line1'))
    option = {
        title: {
            text: '滞销商品类型',
            textStyle: {
                color: 'white'
            }
        },
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: ['数量'],
            textStyle: {
                color: 'white'
            }
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true,
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: data.name,
            axisLabel: {
                show: true,
                textStyle: {
                    color: '#fff'
                }
            }
        },
        yAxis: {
            type: 'value',
            axisLabel: {
                show: true,
                textStyle: {
                    color: '#fff'
                }
            }
        },
        series: [
            {
                name: '数量',
                type: 'line',
                data: data.value
            }
        ]
    };
    myeCharts.setOption(option)
})